<template>
  <div>
    <div class="title">热销推荐</div>
    <ul>
      <li class="item border-bottom" v-for="item of recommendList" :key="item.id">
        <img class="item-img" :src="item.imgUrl" alt />
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
          <button class="item-button">查看详情</button>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "HomeRecommend",
  components: {},
  props: {},
  data() {
    return {
      recommendList: [
        {
          id: "001",
          imgUrl:
            "//img1.qunarzz.com/sight/p0/1708/2b/2b3b94de99c0a425a3.img.jpg_256x160_6b62ea82.jpg",
          title: "八达岭长城",
          desc: "不到长城非好汉"
        },
        {
          id: "002",
          imgUrl:
            "//img1.qunarzz.com/sight/p0/201405/12/51b63883c25f5d87af3c08bb016e2bd7.jpg_256x160_2c506073.jpg",
          title: "恭王府",
          desc: "一起去看看和珅家"
        },
        {
          id: "003",
          imgUrl:
            "//img1.qunarzz.com/sight/p0/1603/85/85c883189bf7293390.water.jpg_256x160_585de5b5.jpg",
          title: "什刹海",
          desc: "北京的温柔乡"
        }
      ]
    };
  },
  watch: {},
  computed: {},
  methods: {},
  created() {},
  mounted() {}
};
</script>
<style lang="stylus" scoped>
@import '~@/assets/styles/mixins.styl';

.title {
  margin-top: 0.2rem;
  line-height: 0.8rem;
  background: #ccc;
  text-indent: 0.2rem;
}

.item {
  display: flex;
  height: 1.9rem;
  overflow: hidden;

  .item-img {
    width: 1.7rem;
    height: 1.7rem;
    padding: 0.1rem;
  }

  .item-info {
    flex: 1;
    padding: 0.1rem;
    min-width: 0;

    .item-title {
      line-height: 0.54rem;
      font-size: 0.32rem;
      ellipsis();
    }

    .item-desc {
      line-height: 0.4rem;
      color: #ccc;
      ellipsis();
    }

    .item-button {
      line-height: 0.44rem;
      background: #ff9300;
      padding: 0.1rem;
      margin-top: 0.16rem;
      border-radius: 0.06rem;
      color: #fff;
    }
  }
}
</style>